package com.waq.controller;

import com.waq.pojo.Customer;
import com.waq.service.CustomerService;
import com.waq.utils.WAQJSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("customer")
@RestController
@Controller
public class CustomerController {
    @Autowired
    private CustomerService customerService;

    @PostMapping("/queryCustomer")
    public WAQJSONResult queryCustomerList(@RequestBody Customer customer) {
        List<Customer> result = customerService.queryCustomerList(customer);
        return WAQJSONResult.ok(result);
    }

    @PostMapping("/changeCustomer")
    public WAQJSONResult changeCustomer(@RequestBody Customer customer) {
        return WAQJSONResult.ok();
    }

    @PostMapping("/consultCustomer")
    public WAQJSONResult consultCustomer(@RequestBody Customer customer) {

    }
}
